#include <iostream>
#include <vector>

class Queue {
public:
    void enqueue(int value) {
        data.push_back(value);
    }

    int dequeue() {
        if (data.empty()) {
            throw std::runtime_error("Queue is empty");
        }
        int value = data.front();
        data.erase(data.begin());
        return value;
    }

    int front() const {
        if (data.empty()) {
            throw std::runtime_error("Queue is empty");
        }
        return data.front();
    }

    bool empty() const {
        return data.empty();
    }

private:
    std::vector<int> data;
};

#include <iostream>
#include <list>

class Queue {
public:
    void enqueue(int value) {
        data.push_back(value);
    }

    int dequeue() {
        if (data.empty()) {
            throw std::runtime_error("Queue is empty");
        }
        int value = data.front();
        data.pop_front();
        return value;
    }

    bool empty() const {
        return data.empty();
    }

private:
    std::list<int> data;
};
